//
//  HJTimer.h
//  KaiChat
//
//  Created by lx on 2023/10/16.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface HJTimer : NSObject

+ (instancetype)timer;

- (void)cancel;

- (void)after:(int)interval execute:(void (^)(void))execute;
- (void)start:(int)interval ongoing:(void (^)(void))ongoing;
- (void)start_SEC:(int)interval ongoing:(void (^)(void))ongoing;
- (void)start_MSEC:(int)interval ongoing:(void (^)(void))ongoing;
- (void)start:(NSInteger)totalTime countdownOngoing:(void (^)(NSInteger time))countdownOngoing countdownEnd:(void (^)(void))countdownEnd;
- (void)start:(int)interval target:(id)target action:(SEL)action;

@end

NS_ASSUME_NONNULL_END
